package models

import "rongyy/src/app"

type RefundHisReq struct {
	OrderSn string  `json:"order_sn"`
	Fee     float64 `json:"fee"`
}

type RefundModel struct {
	BaseModel `xorm:"extends"`
	OrderSn string  `json:"order_sn"`
	RefundSn string `json:"refund_sn"`
	RefundFee     float64 `json:"refund_fee"`
	Remark string `json:"remark"`
}

func (hrm *RefundModel) TableName() string {
	return "refund_log"
}

func (hrm *RefundModel) Create() error {
	_, err := app.DB().Insert(hrm)
	if err != nil {
		return err
	}
	return nil
}
